package fem2;

import math2.FunctionRnToR;
import math2.UnitFunctionRnToR;

/**
 * 
 * The <code>Load</code> represents load in a Finite Element Model.
 * 
 * @author Matthias Baitsch, Kiendung Nguyen, hbui
 */
public abstract class Load extends ModelPart {

	protected FunctionRnToR lambda; // amplification factor at time t

	public Load(MeshPart mp) {
		super(mp);
		this.lambda = UnitFunctionRnToR.getInstance();
	}

	/**
	 * compute external load vector at time t
	 * 
	 * @param t
	 * @return
	 */
	public abstract double[] computeRe(double t);

	/**
	 * set the time amplification factor for this load. By default, it's unity
	 * 
	 * @param lambda
	 */
	public void setTimeFactor(FunctionRnToR lambda) {
		this.lambda = lambda;
	}

}
